import Vue from 'vue'
import VueRouter from 'vue-router'

 Vue.use(VueRouter)
 
 const router = new VueRouter({
  routes:[
    {path:'/',redirect:'/home'},
    {path:'/home' ,component:()=>import('../components/Home.vue')},
    {path:'/movie/:id', component:()=>import('@/components/Movie')},
    {path:'/about', name:'about',component:()=>import('@/components/About'),
    children:[
      {path:'/about',redirect:'/about/tab1'},
      {path:'/about/tab1',component:()=>import('@/components/tabs/Tab1.vue')},
      {path:'tab2',component:()=>import('@/components/tabs/Tab2.vue')}
    ]
  }
  ]
 })
 export default router